| Conditions | 3 | 
| Total Lines | 7 | 
| Code Lines | 6 | 
| Lines | 0 | 
| Ratio | 0 % | 
| Changes | 0 | ||
| 1 | import React from 'react';  | 
            ||
| 11 | |||
| 12 |   componentWillReceiveProps(newProps) { | 
            ||
| 13 |     if (newProps.show) { | 
            ||
| 14 |       this.setState({ style: {} }); | 
            ||
| 15 |     } else if (this.props.show && !newProps.show) { // true => false | 
            ||
| 16 | // set display to 'none' after 1 sec (for fade-out animation)  | 
            ||
| 17 |       setTimeout(() => this.setState({ style: { display: 'none' } }), 1000); | 
            ||
| 18 | }  | 
            ||
| 33 |